package TestCases;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.PageFactory;
import org.testng.annotations.Test;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.AfterTest;

import PageOR.BookAFlight;
import PageOR.FindAFlight;
import PageOR.FlightConfirmation;
import PageOR.SelectAFlight;
import PageOR.WelcomeMercuryTours;

public class TC2 extends SetUp 
{

	@AfterMethod
	public void Cleanup()
	{
		System.out.println("In Cleanup-- After Method");
		driver.close();
	}
	@Test
	public void thirdTC()
	{
		driver.get("http://newtours.demoaut.com/");
		objWelcomeMercuryPage.func_Login("mercury", "mercury");
		objFindFlightPage.func_EnterFlightDEtails("One Way",1, "London", "November", 1, "Paris", "November", 15, "Business class", "No Preference");
		objSelectAFlightPage.func_FindFlights();
		objBookAFlightPage.func_BookFlight("Rohit","LastName","Visa","456789781234","08","2008","733 naamans rd","claymont","CA","UNITED STATES");
		objFlightConfirmationPage.func_GetTicketConfirmationNumber();
		objFlightConfirmationPage.func_LogOut();
	}
	
	@Test
	public void fouthTC()
	{
		driver.get("http://newtours.demoaut.com/");
		driver.manage().window().maximize();
		objWelcomeMercuryPage.func_Login("mercury", "mercury");
		objFindFlightPage.func_EnterFlightDEtails("One Way",1, "London", "November", 1, "Paris", "November", 15, "Business class", "No Preference");
		objSelectAFlightPage.func_FindFlights();
		objBookAFlightPage.func_BookFlight("Rohit","LastName","Visa","456789781234","08","2008","733 naamans rd","claymont","CA","UNITED STATES");
		objFlightConfirmationPage.func_GetTicketConfirmationNumber();
		objFlightConfirmationPage.func_LogOut();
	}

}
